<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>学生信息</title>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" />
    <style type="text/css">
        table.table1 {
            font-family: verdana,arial,sans-serif;
            font-size:11px;
            color:#333333;
            border-width: 1px;
            border-color: #666666;
            border-collapse: collapse;
        }
        table.table1 th {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;

            font-size: 14px;
            text-align: center;
            width: 200px;
            border-width: 1px;
            padding: 8px;
            height: 25px;
            background-color: #efefef;
        }
        table.table1 td {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #ffffff;
            font-size: 14px;
            text-align: left;
            width: 200px;
            border-width: 1px;
            padding: 8px;
        }
        button{
            margin-left: 1190px;
            width: 95px;
            height: 45px;
            border-radius: 5px;
            color: white;
            background-color: #4169E1;
        }
        .message{
            width: 1227px;
            margin-left: 30px;
            margin-top: 15px;
        }
        .table2{
            width: 90%; font-size: 16px;text-align: center;margin: 0 auto;
            border-collapse: separate;border-spacing: 0;border: 2px #e0e0e0;
            margin-top: 20px;
        }

        .tr1{
            background: #efefef;font-size: 14px;height:50px;
        }
        .tr2{
            height: 60px;border-bottom: 2px solid #eaeaea;font-size: 13px;
        }
        .message input {

            width: 160px;
            border: 0px ;
        }


        input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; }
        input[type="number"]{ -moz-appearance: textfield; }
        select{
            width: 160px;
            border: 1px solid ;
        }
        .table2 input{
            background-color: white;
            border-bottom: 1px solid #2e6da4;
            border-top: 0px;
            font-weight: 100;
            border-left: 0px;
            border-right: 0px;
            text-align: center;
            width: 150px;
        }
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    <!-- header -->
    <div th:replace="~{commons/header::header}"></div>

    <!-- left -->
    <div th:replace="~{commons/left::left}"></div>
    <!-- 内容主体区域 -->
    <div class="layui-body">
        <div style="padding:20px 0px 45px 0px;">
            <h1 style="text-align: center">学生信息</h1>
            <div class="message">
                <form action="/staff_update_stu" method="post" th:object="${studentInfo4}" onsubmit="return validateForm();"
                      name="myForm" autocomplete="off">
                    <input name="stuIdPast" type="hidden" th:value="${studentInfo4.getStuId()}">
                    <input type="submit" value="保存" class="savebutton" style=" margin-left: 1130px;
            width: 95px;height: 45px;border-radius: 5px;color: white;background-color: #4169E1;">
                <h2>一、基本信息</h2>
                <table class="table1">
                    <tr th:each="studentInfo:${studentInfo4}">
                        <td rowspan="6" style="width: 200px;">  <img src="image/photo.jpg" style="width: 102px;height: 135px;"></td>
                        <th >姓名</th>
                        <td ><input type="text" name="stuName" th:value="${studentInfo.getStuName()}"> </td>
                        <th>曾用名</th>
                        <td > <input type="text" name="stuPastName" th:value="${studentInfo.getStuPastName()}"></td>
                        <th>学号</th>
                        <td ><input type="number" name="stuId" th:value="${studentInfo.getStuId()}"> </td>
                        <th>拼音</th>
                        <td ><input type="text" name="stuPinyin" th:value="${studentInfo.getStuPinyin()}"> </td>
                    </tr>
                    <tr th:each="studentInfo:${studentInfo4}">
                        <th>性别</th>
                        <td >
                            <select name="stuSex">
                            <option th:selected="${studentInfo.getStuSex()}=='男'" value="男">男</option>
                            <option th:selected="${studentInfo.getStuSex()}=='女'" value="女">女</option>
                        </select>
                        </td>
                        <th>婚姻</th>
                        <td >
                            <select name="stuMarriage">
                                <option th:selected="${studentInfo.getStuMarriage()}=='已婚'" value="已婚">已婚</option>
                                <option th:selected="${studentInfo.getStuMarriage()}=='未婚'" value="未婚">未婚</option>
                            </select>
                        </td>
                        <th>辅导员</th>
                        <td ><input type="text" name="stuInstructor" th:value="${studentInfo.getStuInstructor()}"></td>
                        <th>政治面貌</th>
                        <td >
                            <select name="stuPoliticalOutlook">
                                <option th:selected="${studentInfo.getStuPoliticalOutlook()}=='群众'" value="群众">群众</option>
                                <option th:selected="${studentInfo.getStuPoliticalOutlook()}=='共青团员'" value="共青团员">共青团员</option>
                                <option th:selected="${studentInfo.getStuPoliticalOutlook()}=='预备党员'" value="预备党员">预备党员</option>
                                <option th:selected="${studentInfo.getStuPoliticalOutlook()}=='中共党员'" value="中共党员">中共党员</option>
                            </select></td>
                        </td>
                    </tr>
                    <tr th:each="studentInfo:${studentInfo4}">
                        <th>国籍</th>
                        <td >
                            <select name="stuCountry">
                                <option th:selected="${studentInfo.getStuCountry()}=='中国'" value="中国">中国</option>
                                <option th:selected="${studentInfo.getStuCountry()}=='新加坡'" value="新加坡">新加坡</option>
                                <option th:selected="${studentInfo.getStuCountry()}=='英国'" value="英国">英国</option>
                                <option th:selected="${studentInfo.getStuCountry()}=='美国'" value="美国">美国</option>
                                <option th:selected="${studentInfo.getStuCountry()}=='德国'" value="德国">德国</option>
                                <option th:selected="${studentInfo.getStuCountry()}=='法国'" value="法国">法国</option>
                                <option th:selected="${studentInfo.getStuCountry()}=='意大利'" value="意大利">意大利</option>
                                <option th:selected="${studentInfo.getStuCountry()}=='其他'" value="其他">其他</option>
                            </select>
                        </td>
                        <th>籍贯</th>
                        <td ><input type="text" name="stuProvince" th:value="${studentInfo.getStuProvince()}"> </td>
                        <th>民族</th>
                        <td >
                            <select name="stuNation">
                                <option value="汉族">汉族</option>
                                <option value="蒙古族">蒙古族</option>
                                <option value="彝族">彝族</option>
                                <option value="侗族">侗族</option>
                                <option value="哈萨克族">哈萨克族</option>
                                <option value="畲族">畲族</option>
                                <option value="纳西族">纳西族</option>
                                <option value="仫佬族">仫佬族</option>
                                <option value="仡佬族">仡佬族</option>
                                <option value="怒族">怒族</option>
                                <option value="保安族">保安族</option>
                                <option value="鄂伦春族">鄂伦春族</option>
                                <option value="回族">回族</option>
                                <option value="壮族">壮族</option>
                                <option value="瑶族">瑶族</option>
                                <option value="傣族">傣族</option>
                                <option value="高山族">高山族</option>
                                <option value="景颇族">景颇族</option>
                                <option value="羌族">羌族</option>
                                <option value="锡伯族">锡伯族</option>
                                <option value="乌孜别克族">乌孜别克族</option>
                                <option value="裕固族">裕固族</option>
                                <option value="赫哲族">赫哲族</option>
                                <option value="藏族">藏族</option>
                                <option value="布依族">布依族</option>
                                <option value="白族">白族</option>
                                <option value="黎族">黎族</option>
                                <option value="拉祜族">拉祜族</option>
                                <option value="柯尔克孜族">柯尔克孜族</option>
                                <option value="布朗族">布朗族</option>
                                <option value="阿昌族">阿昌族</option>
                                <option value="俄罗斯族">俄罗斯族</option>
                                <option value="京族">京族</option>
                                <option value="门巴族">门巴族</option>
                                <option value="维吾尔族">维吾尔族</option>
                                <option value="朝鲜族">朝鲜族</option>
                                <option value="土家族">土家族</option>
                                <option value="傈僳族">傈僳族</option>
                                <option value="水族">水族</option>
                                <option value="土族">土族</option>
                                <option value="撒拉族">撒拉族</option>
                                <option value="普米族">普米族</option>
                                <option value="鄂温克族">鄂温克族</option>
                                <option value="塔塔尔族">塔塔尔族</option>
                                <option value="珞巴族">珞巴族</option>
                                <option value="苗族">苗族</option>
                                <option value="满族">满族</option>
                                <option value="哈尼族">哈尼族</option>
                                <option value="佤族">佤族</option>
                                <option value="东乡族">东乡族</option>
                                <option value="达斡尔族">达斡尔族</option>
                                <option value="毛南族">毛南族</option>
                                <option value="塔吉克族">塔吉克族</option>
                                <option value="德昂族">德昂族</option>
                                <option value="独龙族">独龙族</option>
                                <option value="基诺族">基诺族</option>
                            </select>
                        </td>
                        <th>出生日期</th>
                        <td ><input type="date" name="stuBirth" th:value="${studentInfo.getStuBirth()}"> </td>
                    </tr>
                    <tr th:each="studentInfo:${studentInfo4}">
                        <th>身份证号</th>
                        <td ><input type="text" name="stuIdCard" th:value="${studentInfo.getStuIdCard()}"></td>

                        <th>宿舍</th>
                        <td ><input type="text" name="stuDormitory" th:value="${studentInfo.getStuDormitory()}"></td>


                        <th>特别关注</th>
                        <td >
                            <select name="stuSpecialAttention" >
                                <option th:selected="${studentInfo.getStuSpecialAttention()}=='无'" value="无">无</option>
                                <option th:selected="${studentInfo.getStuSpecialAttention()}=='家庭经济困难'" value="家庭经济困难">家庭经济困难</option>
                                <option th:selected="${studentInfo.getStuSpecialAttention()}=='学业困难'" value="学业困难">学业困难</option>
                                <option th:selected="${studentInfo.getStuSpecialAttention()}=='心理问题'" value="心理问题">心理问题</option>
                                <option th:selected="${studentInfo.getStuSpecialAttention()}=='留守儿童'" value="留守儿童">留守儿童</option>
                                <option th:selected="${studentInfo.getStuSpecialAttention()}=='农民工子女'" value="农民工子女">农民工子女</option>
                                <option th:selected="${studentInfo.getStuSpecialAttention()}=='山区'" value="山区">山区</option>
                                <option th:selected="${studentInfo.getStuSpecialAttention()}=='单身家庭'" value="单身家庭">单身家庭</option>
                                <option th:selected="${studentInfo.getStuSpecialAttention()}=='先天性疾病'" value="先天性疾病">先天性疾病</option>
                                <option th:selected="${studentInfo.getStuSpecialAttention()}=='残疾家庭子女'" value="残疾家庭子女">残疾家庭子女</option>
                            </select>
                        </td>


                        <th>是否为贫困生</th>
                        <td >
                            <select name="stuIsPoor" >

                                <option th:selected="${studentInfo.getStuIsPoor()}=='是'" value="否">否</option>
                                <option th:selected="${studentInfo.getStuIsPoor()}=='否'" value="是">是</option>
                            </select>
                        </td>
                    </tr>
                    <tr th:each="studentInfo:${studentInfo4}">
                        <th >受助等级</th>
                        <td >
                            <select name="stuAssistanceLevel" >
                                <option th:selected="${studentInfo.getStuAssistanceLevel()}=='无'" value="无">无</option>
                                <option th:selected="${studentInfo.getStuAssistanceLevel()}=='贫困'" value="贫困">贫困</option>
                                <option th:selected="${studentInfo.getStuAssistanceLevel()}=='特困'" value="特困">特困</option>
                            </select>
                        </td>
                        <th>特长</th>
                        <td colspan="5"><input type="text" name="stuAdvantage" th:value="${studentInfo.getStuAdvantage()}"></td>
                    </tr>
                    <tr th:each="studentInfo:${studentInfo4}">

                        <th>既往病史</th>
                        <td colspan="7"><input type="text" name="stuPastIll" th:value="${studentInfo.getStuPastIll()}"></td>
                    </tr>
                    <tr >
                        <td colspan="9" style="border-right:0px;border-left:0px; "><h2>二、联系方式</h2></td>
                    </tr>
                    <tr th:each="studentInfo:${studentInfo4}">
                        <td rowspan="2" style="width: 330px;"> </td>
                        <th>邮编</th>
                        <td ><input type="number" name="stuPostalCode" th:value="${studentInfo.getStuPostalCode()}"></td>
                        <th>微信</th>
                        <td ><input type="text" name="stuWechat" th:value="${studentInfo.getStuWechat()}"></td>
                        <th>qq</th>
                        <td ><input type="number" name="stuQq" th:value="${studentInfo.getStuQq()}"></td>
                        <th>邮箱</th>
                        <td ><input type="email" name="stuEmail" th:value="${studentInfo.getStuEmail()}"></td>
                    </tr>
                    <tr th:each="studentInfo:${studentInfo4}">
                        <th>手机号码</th>
                        <td ><input type="number" name="stuPhone" th:value="${studentInfo.getStuPhone()}"></td>
                        <th > 家庭住址</th>
                        <td colspan="5">
                            <input type="text" name="stuAddress" th:value="${studentInfo.getStuAddress()}" style="border: 0px ;
            width: 425px;">
                        </td>
                    </tr>
                    <tr >
                        <td colspan="9" style="border-right:0px;border-left:0px; "><h2>三、银行信息</h2></td>
                    </tr>
                    <tr th:each="studentInfo:${studentInfo4}">
                        <td ></td>
                        <th>所属银行</th>
                        <td ><select name="stuBankName">
                            <option>请选择所属银行</option>
                            <option th:selected="${studentInfo.getStuBankName()}=='中国工商银行'" value="中国工商银行">中国工商银行</option>
                            <option th:selected="${studentInfo.getStuBankName()}=='中国建设银行'" value="中国建设银行">中国建设银行</option>
                            <option th:selected="${studentInfo.getStuBankName()}=='交通银行'" value="交通银行">交通银行</option>
                        </select>
                        </td>
                        <th>开户行</th>
                        <td >

                            <select name="stuBankAddress">
                                <option>请选择开户行</option>
                        <option  th:selected="${studentInfo.getStuBankAddress()}=='福州闽都支行'" value="福州闽都支行">福州闽都支行</option>
                        <option  th:selected="${studentInfo.getStuBankAddress()}=='福建自贸试验区福州片区分行'" value="福建自贸试验区福州片区分行">中国建设银行</option>
                        <option  th:selected="${studentInfo.getStuBankAddress()}=='福州奥体支行'" value="福州奥体支行">福州奥体支行</option>
                    </select></td>
                        <th>银行卡号</th>
                        <td ><input type="number" name="stuBankId" th:value="${studentInfo.getStuBankId()}"></td>
                        <th></th><td></td>
                    </tr>
                    <tr >
                        <td colspan="9" style="border-right:0px;border-left:0px; "><h2>四、学籍信息</h2></td>
                    </tr>
                    <tr th:each="studentInfo:${studentInfo4}">

                        <td rowspan="3" style="width: 300px;"> </td>
                        <th>年级</th>
                        <td >
                            <select name="stuGrade">
                                <option th:selected="${studentInfo.getStuGrade()}=='2016'" value="2016">2016</option>
                                <option th:selected="${studentInfo.getStuGrade()}=='2017'" value="2017">2017</option>
                                <option th:selected="${studentInfo.getStuGrade()}=='2018'" value="2018">2018</option>
                                <option th:selected="${studentInfo.getStuGrade()}=='2019'" value="2019">2019</option>
                                <option th:selected="${studentInfo.getStuGrade()}=='2020'" value="2020">2020</option>
                                <option th:selected="${studentInfo.getStuGrade()}=='2021'" value="2021">2021</option>
                            </select></td>
                        <th>二级学院</th>
                        <td ><select name="province" onChange="set_city(this, this.form.city);">

                            <option th:value="${studentInfo.getStuCollege()}"
                                    th:text="${studentInfo.getStuCollege()}"></option>
                            <option value="商学院">商学院</option>
                            <option value="现代管理学院">现代管理学院</option>
                            <option value="土木工程">土木工程</option>
                            <option value="人工智能学院">人工智能学院</option>
                            <option value="外国语与海外教育学院">外国语与海外教育学院</option>
                            <option value="设计学院">设计学院</option>
                            <option value="儿童与发展教育学院">儿童与发展教育学院</option>
                            <option value="现代音乐学院">现代音乐学院</option>
                            <option value="法学院">法学院</option>
                        </select></td>
                        <th>专业</th>
                        <td > <select   name="city" id="citys">
                            <option th:value="${studentInfo.getStuMajor()}"
                                    th:text="${studentInfo.getStuMajor()}"></option>
                            <option value="0">选择专业</option>
                        </select></td>
                        <th>班级</th>
                        <td >
                            <select name="stuClass">
                                <option th:selected="${studentInfo.getStuClass()}=='1班'" value="1班">1班</option>
                                <option th:selected="${studentInfo.getStuClass()}=='2班'" value="2班">2班</option>
                            </select>
                        </td>
                    </tr>
                    <tr th:each="studentInfo:${studentInfo4}">
                        <th>学制</th>
                        <td >  <select name="stuLength" >
                            <option th:selected="${studentInfo.getStuLength()}=='四年制'" value="四年制">四年制</option>
                            <option th:selected="${studentInfo.getStuLength()}=='两年制'" value="两年制">两年制</option>
                        </select></td>
                        <th>生源地</th>
                        <td ><input name="stuSource" type="text"  th:value="${studentInfo.getStuSource()}"></td>
                        <th>考生号</th>
                        <td ><input name="stuExamNum" type="text"  th:value="${studentInfo.getStuExamNum()}"></td>
                        <th>入学时间</th>
                        <td ><input name="stuEnterTime" type="date"  th:value="${studentInfo.getStuEnterTime()}"></td>
                    </tr>
                    <tr th:each="studentInfo:${studentInfo4}">
                        <th>学生类别</th>
                        <td ><select name="stuType" >
                            <option th:selected="${studentInfo.getStuType()}=='本科'" value="本科">本科</option>
                            <option th:selected="${studentInfo.getStuType()}=='专升本'" value="专升本">专升本</option>
                            <option th:selected="${studentInfo.getStuType()}=='自考'" value="自考">自考</option>
                            <option th:selected="${studentInfo.getStuType()}=='培养生'" value="培养生">培养生</option>
                        </select></td>
                        <th>入学方式</th>
                        <td > <select name="stuEnterType" >
                            <option th:selected="${studentInfo.getStuEnterType()}=='定向培养'" value="定向培养">定向培养</option>
                            <option th:selected="${studentInfo.getStuEnterType()}=='高水平运动员'" value="高水平运动员">高水平运动员</option>
                            <option th:selected="${studentInfo.getStuEnterType()}=='外来港澳台侨生'" value="外来港澳台侨生">外来港澳台侨生</option>
                            <option th:selected="${studentInfo.getStuEnterType()}=='外校转入'" value="外校转入">外校转入</option>
                            <option th:selected="${studentInfo.getStuEnterType()}=='访学学生'" value="访学学生">访学学生</option>
                            <option th:selected="${studentInfo.getStuEnterType()}=='考试推荐'" value="考试推荐">考试推荐</option>
                            <option th:selected="${studentInfo.getStuEnterType()}=='恢复入学资格'" value="恢复入学资格">恢复入学资格</option>
                            <option th:selected="${studentInfo.getStuEnterType()}=='保送生'" value="保送生">保送生</option>
                            <option th:selected="${studentInfo.getStuEnterType()}=='联合办学'" value="联合办学">联合办学</option>
                            <option th:selected="${studentInfo.getStuEnterType()}=='其他'" value="其他">其他</option>
                        </select></td>
                        <th>培养层次</th>
                        <td ><select name="stuLevel" >
                            <option th:selected="${studentInfo.getStuLevel()}=='本科'" value="本科">本科</option>
                            <option th:selected="${studentInfo.getStuLevel()}=='专升本'" value="专升本">专升本</option>
                            <option th:selected="${studentInfo.getStuLevel()}=='自考'" value="自考">自考</option>
                            <option th:selected="${studentInfo.getStuLevel()}=='培养生'" value="培养生">培养生</option>
                            <option th:selected="${studentInfo.getStuLevel()}=='硕士研究生'" value="硕士研究生">硕士研究生</option>
                        </select></td>
                        <th>学籍状态</th>
                        <td >
                            <select name="stuStates" >
                                <option th:selected="${studentInfo.getStuStates()}=='在学'" value="在学">在学</option>
                                <option th:selected="${studentInfo.getStuStates()}=='休学'" value="休学">休学</option>
                                <option th:selected="${studentInfo.getStuStates()}=='退学'" value="退学">退学</option>
                                <option th:selected="${studentInfo.getStuStates()}=='毕业'" value="毕业">毕业</option>
                                <option th:selected="${studentInfo.getStuStates()}=='结业'" value="结业">结业</option>
                                <option th:selected="${studentInfo.getStuStates()}=='保留学籍'" value="保留学籍">保留学籍</option>
                                <option th:selected="${studentInfo.getStuStates()}=='取消学籍'" value="取消学籍">取消学籍</option>
                                <option th:selected="${studentInfo.getStuStates()}=='其他'" value="其他">其他</option>
                            </select>
                        </td>
                    </tr>

                </table>
                </form>
                <h2>五、家庭信息</h2>

                <table class="table2">
                    <thead>
                    <tr class="tr1">
                        <th>关系</th>
                        <th>家长姓名</th>
                        <th>家长联系方式</th>
                        <th>工作类型</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>

                    <tr class="tr2" th:each="stuFamily:${familyInfo4}" >
                        <form th:action="@{/stu_family_update}" th:object="${stuFamily}" method="post"  onsubmit="return updateFamily();"
                              name="familyForm1" autocomplete="off">
                            <input type="hidden" name="familyNum" th:value="${stuFamily.getFamilyNum()}" >
                            <td ><input name="familyRelation" type="text" th:value="${stuFamily.getFamilyRelation()}"  class="faminput"></td>
                            <td ><input name="familyName" type="text" th:value="${stuFamily.getFamilyName()}" class="faminput"> </td>
                            <td ><input name="familyPhone" type="number" th:value="${stuFamily.getFamilyPhone()}" class="faminput"></td>
                            <td ><input name="familyWorkAddress" type="text" th:value="${stuFamily.getFamilyWorkAddress()}" class="faminput"> </td>
                            <td>
                                <input type="submit" value="编辑" id="updateFamily"
                                       style="width:45px;height:30px;border-radius: 5px;color:white;background-color:#4169E1;margin-left:5px;">
                                <a th:href="@{'/stu_family_delete/'+${stuFamily.getFamilyNum()}}" ><input type="button" value="删除" th:onclick="return del()"
                                                                                                          style="width:45px;height:30px;border-radius: 5px;color:white;background-color:red;margin-left:5px;"></a>
                            </td>
                        </form>
                    </tr>
                    <form action="/stu_family_add" method="post" onsubmit="return addFamily();" name="familyForm2" autocomplete="off">
                        <tr class="tr2">
                            <td><input type="text" name="familyRelation2" class="faminput"></td>
                            <td><input type="text" name="familyName2" class="faminput"></td>
                            <td><input type="number" name="familyPhone2" class="faminput"></td>
                            <td><input type="text" name="familyWorkAddress2" class="faminput"> </td>
                            <td><input type="submit" value="添加" name="submit"   style="width:65px;height:30px;border-radius:
                            5px;color:white;background-color:greenyellow;margin-left:5px;"  ></td>
                        </tr>
                    </form>
                    </tbody>
                </table>
                </form>
            </div>




            </div>

        </div>



    </div>
</div>
<script>
    layui.use('element', function() {
        var element = layui.element;
    });
    function FormatDate (strTime) {
        var date = new Date(strTime);
        return date.getFullYear()+"/"+(date.getMonth()+1)+"/"+date.getDate();
    }

    function validateForm(){
        var stuPinyin=document.forms["myForm"]["stuPinyin"].value;
        var stuId=document.forms["myForm"]["stuId"].value;
        var stuName=document.forms["myForm"]["stuName"].value;
        var stuPastName=document.forms["myForm"]["stuPastName"].value;
        var stuInstructor=document.forms["myForm"]["stuInstructor"].value;
        var stuDormitory=document.forms["myForm"]["stuDormitory"].value;
        var stuProvince=document.forms["myForm"]["stuProvince"].value;
        var address=document.forms["myForm"]["stuAddress"].value;

        var stuIdCard=document.forms["myForm"]["stuIdCard"].value;
        var stuBankId=document.forms["myForm"]["stuBankId"].value;

        var qq=document.forms["myForm"]["stuQq"].value;
        var wechat=document.forms["myForm"]["stuWechat"].value;
        var advantage=document.forms["myForm"]["stuAdvantage"].value;
        var pastIll=document.forms["myForm"]["stuPastIll"].value;
        var phone=document.forms["myForm"]["stuPhone"].value;
        var postalCode=document.forms["myForm"]["stuPostalCode"].value;
        var bankId=document.forms["myForm"]["stuBankId"].value;
        var stuBirth=document.forms["myForm"]["stuBirth"].value;
        var stuEnterTime=document.forms["myForm"]["stuEnterTime"].value;
        var date = new Date();
        var seperator1 = "-";
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var day = date.getDate();
        var currentdate = year + seperator1 +0+ month + seperator1 + 0+day;
        if (phone.length!==11){
            alert("手机号的长度为11位");
            return false;
        }else if (postalCode.length!==6){
            alert("邮编的长度为6位");
            return false;
        }else if(stuId.length==0||stuName.length==0||stuPastName.length==0||stuInstructor.length==0||stuDormitory.length==0
            ||stuProvince.length==0||stuBankId.length==0||qq.length==0||wechat.length==0||
            advantage.length==0||address.length==0||pastIll.length==0||stuPinyin.length==0){
            alert("输入不能为空");
            return false;
        }else if (bankId.length!==18){
            alert("银行卡号的长度为18位");
            return false;
        }else if(stuBirth>currentdate){
            alert("出生日期不能晚于当前时间");
            return false;
        }else if(stuEnterTime>currentdate
        ){
            alert("入学日期不能晚于当前时间");
            return false;
        }else if(stuIdCard.length!=18){
            alert("身份证的长度为18位");
            return false;
        }
        else{
           alert("修改成功");
            return true;
        }
    }


    function set_city(province, city)
    {
        cities = new Object();
        cities['商学院']=new Array('会计学','工商管理','电子商务','国际经济与贸易','‘金融学','市场营销');
        cities['现代管理学院']=new Array('行政管理','广播电视编导','酒店管理','物业管理','文化产业管理');
        cities['土木工程']=new Array('土木工程','工程管理','建筑电气与智能化','道路桥梁与渡河工程');
        cities['人工智能学院']=new Array('金融科技', '机器人工程', '人工智能', '物联网工程', '数据科学与大数据技术',
            '电子信息工程', '计算机科学与技术', '通信工程', '软件工程', '网络工程');
        cities['外国语与海外教育学院']=new Array('商务英语', '日语');
        cities['设计学院']=new Array('数字媒体技术', '广告学', '美术学');
        cities['儿童与发展教育学院']=new Array('学前教育', '应用心理学');
        cities['现代音乐学院']=new Array('音乐学', '舞蹈学');
        cities['法学院']=new Array('法学');
        var pv, cv;
        var i, ii;
        pv=province.value;
        cv=city.value;
        city.length=1;
        if(pv=='0') return;
        if(typeof(cities[pv])=='undefined') return;
        for(i=0; i<cities[pv].length; i++)
        {
            ii = i+1;
            city.options[ii] = new Option();
            city.options[ii].text = cities[pv][i];
            city.options[ii].value = cities[pv][i];
        }
    }
    function del(){
        if(!confirm("确认要删除？")){
            window.event.returnValue = false;
        }
    }

</script>
</body>
</html>